import java.net.*;
import java.io.*;

public class calculatorClient{
	public static void main(String[] args) throws IOException {

		String separator = "\n";
		String para = args[0] + separator + args[1] + separator + args[2];
		byte[] message = para.getBytes();

		int port = 4321;
		DatagramSocket socket = new DatagramSocket();
		InetAddress address = InetAddress.getByName("127.0.0.1");
		DatagramPacket send = new DatagramPacket(message, message.length, address, port);

		socket.send(send);

		byte[] m = new byte[200];
		DatagramPacket receive = new DatagramPacket(m, m.length);

		socket.receive(receive);
		System.out.println("ans: "+new String(receive.getData()));
		socket.close();
	}
}